use std::io::{Read, Write};
use std::net::TcpStream;
use std::str;
fn main() {
    let mut stream = TcpStream::connect("127.0.0.1:3000").unwrap();
    println!("connected to 127.0.0.1:3000");

    stream.write(b"hello world").unwrap();

    let mut buffer = [0; 1024];

    stream.read(&mut buffer).unwrap();

    println!("response {}", str::from_utf8(&buffer).unwrap());
}
